package com.sean.spring.boot.example.datasource;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import javax.sql.DataSource;


/**
 * Spring Datasource 配置示例
 * author 田尘殇(Sean tianchenshang@lijindai.com)
 * date 2015/5/27
 * time 11:46
 */
@SpringBootApplication
public class DatasourceApplication {

    public static void main(String[] args) {
        ApplicationContext app = SpringApplication.run(DatasourceApplication.class, args);

        DataSource dataSource = app.getBean(DataSource.class);

        System.out.println("Spring Boot自动配置的Datasource->" + dataSource);

    }
}
